package com.wxq.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wxq.common.to.mq.SeckillOrderTO;
import com.wxq.common.utils.PageUtils;
import com.wxq.order.entity.OrderEntity;
import com.wxq.order.vo.OrderConfirmVO;
import com.wxq.order.vo.OrderSubmitResponseVO;
import com.wxq.order.vo.OrderSubmitVO;
import com.wxq.order.vo.PayVO;

import java.util.Map;

/**
 * 订单
 *
 * @author jim
 * @email 2982877319@qq.com
 * @date 2022-03-13 19:31:51
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVO confirmOrder() throws Exception;

    /**
     * 获取订单支付信息
     * @param orderSn
     * @return
     */
    PayVO getOrderPay(String orderSn);
    /**
     * 下单操作
     * @param vo
     * @return
     */
    OrderSubmitResponseVO submitOrder(OrderSubmitVO vo);

    /**
     * 查询订单
     * @param orderSn 订单号
     * @return
     */
    OrderEntity getOrderByOrderSn(String orderSn);

    /**
     * 修改订单状态
     * @param outTradeNo
     * @param code
     */
    void updateOrderStatus(String outTradeNo, Integer code);

    void createSeckillOrder(SeckillOrderTO seckillOrder);

    void closeOrder(OrderEntity entity);
}

